<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
</head>
<body>
 <div id="app">
    <cpn1></cpn1>
  </div>

 <template id="cpn1">
   <div>
     <h2>{{title}}</h2>
     <p>{{content}}</p>
   </div>
 </template>
     <script src="../js/vue.js"></script>
     <script>
       const app=new Vue({
         el: '#app',
         data: {
           message:'你好vue',
         },
         components:{
           'cpn1': {
             template: '#cpn1',
             data(){
               return {
                 title: '我是标题1',
                 content: '我是内容2'
               }
             }
           }
         }
       })
     </script>
</body>
</html>